var NSCanvasStage = function( canvas )
{
	var _canvas = canvas;
	var _context = canvas.getContext( "2d" );
	var _children = [];
	
	this.addChild = function( child )
	{
		_children.push( child );
	}
	
	this.getNumChildren	= function()
	{
		return _children.length;
	}
	
	// 렌더링
	var _intervalID = -1;
	this.start = function()
	{
		this.stop();
		_intervalID = setInterval( onRender, 33 );
	}
	this.stop = function()
	{
		if( _intervalID != -1 )
		{
			clearInterval( _intervalID );
			_intervalID = -1;
		}
	}
	this.removeAllChildren = function()
	{
		while( _children.length > 0 )
		{
			_children.pop();
		}
	}
	
	
	
	function onRender()
	{
		_context.clearRect( 0, 0, _canvas.width, _canvas.height );
		var _len = _children.length;
		for( var i=0; i<_len; i++ )
		{
			_children[i]._displayUpdateWithContext2D( _context );
		}
	}
}